package org.pplb5.siresto;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class MenuAdapter extends ArrayAdapter<MenuMakanan> {
	Context c;
	MenuMakanan[] menu;
	ImageView menuIcon;
	TextView menuNama;
	//private static final String ASSETS_DIR = "images/";

	public MenuAdapter(Context context, int textViewResourceId,
			MenuMakanan[] objects) {
		super(context, textViewResourceId, objects);
		c = context;
		menu = objects;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		View row = convertView;
		//MenuMakanan res = getItem(position);

		//menuIcon = (ImageView) row.findViewById(R.id.menuIcon);
		//menuNama = (TextView) row.findViewById(R.id.menuName);

		//menuNama.setText(res.getNama());

		//String imgFilePath = ASSETS_DIR + res.getGambar();
		//try {
			//Bitmap bitmap = BitmapFactory.decodeStream(c
			//		.getResources().getAssets().open("images/forkandspoon.jpg"));
			//menuIcon.setImageBitmap(bitmap);
		//} catch (IOException e) {
			//e.printStackTrace();
		//}

		return row;
	}

}

